package demo1216.am;

import java.util.Scanner;

/*
匹配qq号的正则表达式
 */
public class Demo_02 {
    public static void main(String[] args) {
        String qqRegex = "\\d{5,10}";
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入一个qq号:");
        String qq = scan.next();
        if (qq.matches(qqRegex)){
            System.out.println("验证通过");
        }else {
            System.out.println("验证不通过");
        }

    }
}
